package com.mtons.mblog;

import java.io.File;
import java.io.IOException;

public class Filetest {
	
	public static void main(String[] args) throws IOException {
		File f = new File("E:\\workspace_iotauth\\mblog\\src\\main\\resources\\static\\dist\\vendors\\qqFace\\qq");
		a(f);
	}
	
	public static void a(File f) throws IOException {
		File[] list = f.listFiles();
		int index = 1;
        for (File file : list) {
            if (file.isDirectory()) {
                a(file);
            }else {
            	//System.out.println(file.getPath().replace(file.getName(), index + ".gif"));
            	file.renameTo(new File(file.getPath().replace(file.getName(), index + ".gif")));
            	index ++;
            }
        }
	}
}
